3.9 \(\int \frac {\sec ^5(x)}{i+\cot (x)} \, dx\)

Optimal. Leaf size=40 \[ \frac {\sec ^3(x)}{3}+\frac {1}{8} i \tanh ^{-1}(\sin (x))-\frac {1}{4} i \tan (x) \sec ^3(x)+\frac {1}{8} i \tan (x) \sec (x) \]

[Out]

1/8*I*arctanh(sin(x))+1/3*sec(x)^3+1/8*I*sec(x)*tan(x)-1/4*I*sec(x)^3*tan(x)

________________________________________________________________________________________

Rubi [A]  time = 0.17, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.615, Rules used = {3518, 3108, 3107, 2606, 30, 2611, 3768, 3770} \[ \frac {\sec ^3(x)}{3}+\frac {1}{8} i \tanh ^{-1}(\sin (x))-\frac {1}{4} i \tan (x) \sec ^3(x)+\frac {1}{8} i \tan (x) \sec (x) \]

Antiderivative was successfully verified.

[In]

Int[Sec[x]^5/(I + Cot[x]),x]

[Out]

(I/8)*ArcTanh[Sin[x]] + Sec[x]^3/3 + (I/8)*Sec[x]*Tan[x] - (I/4)*Sec[x]^3*Tan[x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3107

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_.), x_Symbol] :> Int[ExpandTrig[cos[c + d*x]^m*sin[c + d*x]^n*(a*cos[c + d*x] + b*sin[c +
 d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && IGtQ[p, 0]

Rule 3108

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_), x_Symbol] :> Dist[a^p*b^p, Int[(Cos[c + d*x]^m*Sin[c + d*x]^n)/(b*Cos[c + d*x] + a*Sin
[c + d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[a^2 + b^2, 0] && ILtQ[p, 0]

Rule 3518

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[(Sin[e + f*x]
^m*(a*Cos[e + f*x] + b*Sin[e + f*x])^n)/Cos[e + f*x]^n, x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
 ILtQ[n, 0] && ((LtQ[m, 5] && GtQ[n, -4]) || (EqQ[m, 5] && EqQ[n, -1]))

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\sec ^5(x)}{i+\cot (x)} \, dx &=-\int \frac {\sec ^4(x) \tan (x)}{-\cos (x)-i \sin (x)} \, dx\\ &=i \int \sec ^4(x) (-i \cos (x)-\sin (x)) \tan (x) \, dx\\ &=i \int \left (-i \sec ^3(x) \tan (x)-\sec ^3(x) \tan ^2(x)\right ) \, dx\\ &=-\left (i \int \sec ^3(x) \tan ^2(x) \, dx\right )+\int \sec ^3(x) \tan (x) \, dx\\ &=-\frac {1}{4} i \sec ^3(x) \tan (x)+\frac {1}{4} i \int \sec ^3(x) \, dx+\operatorname {Subst}\left (\int x^2 \, dx,x,\sec (x)\right )\\ &=\frac {\sec ^3(x)}{3}+\frac {1}{8} i \sec (x) \tan (x)-\frac {1}{4} i \sec ^3(x) \tan (x)+\frac {1}{8} i \int \sec (x) \, dx\\ &=\frac {1}{8} i \tanh ^{-1}(\sin (x))+\frac {\sec ^3(x)}{3}+\frac {1}{8} i \sec (x) \tan (x)-\frac {1}{4} i \sec ^3(x) \tan (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.60, size = 61, normalized size = 1.52 \[ -\frac {1}{48} i \left (6 \left (\log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )\right )\right )+\sec ^3(x) (-3 (\cos (2 x)-3) \tan (x)+16 i)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]^5/(I + Cot[x]),x]

[Out]

(-1/48*I)*(6*(Log[Cos[x/2] - Sin[x/2]] - Log[Cos[x/2] + Sin[x/2]]) + Sec[x]^3*(16*I - 3*(-3 + Cos[2*x])*Tan[x]
))

________________________________________________________________________________________

fricas [B]  time = 0.77, size = 121, normalized size = 3.02 \[ \frac {{\left (3 i \, e^{\left (8 i \, x\right )} + 12 i \, e^{\left (6 i \, x\right )} + 18 i \, e^{\left (4 i \, x\right )} + 12 i \, e^{\left (2 i \, x\right )} + 3 i\right )} \log \left (e^{\left (i \, x\right )} + i\right ) + {\left (-3 i \, e^{\left (8 i \, x\right )} - 12 i \, e^{\left (6 i \, x\right )} - 18 i \, e^{\left (4 i \, x\right )} - 12 i \, e^{\left (2 i \, x\right )} - 3 i\right )} \log \left (e^{\left (i \, x\right )} - i\right ) + 6 \, e^{\left (7 i \, x\right )} + 22 \, e^{\left (5 i \, x\right )} + 106 \, e^{\left (3 i \, x\right )} - 6 \, e^{\left (i \, x\right )}}{24 \, {\left (e^{\left (8 i \, x\right )} + 4 \, e^{\left (6 i \, x\right )} + 6 \, e^{\left (4 i \, x\right )} + 4 \, e^{\left (2 i \, x\right )} + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^5/(I+cot(x)),x, algorithm="fricas")

[Out]

1/24*((3*I*e^(8*I*x) + 12*I*e^(6*I*x) + 18*I*e^(4*I*x) + 12*I*e^(2*I*x) + 3*I)*log(e^(I*x) + I) + (-3*I*e^(8*I
*x) - 12*I*e^(6*I*x) - 18*I*e^(4*I*x) - 12*I*e^(2*I*x) - 3*I)*log(e^(I*x) - I) + 6*e^(7*I*x) + 22*e^(5*I*x) +
106*e^(3*I*x) - 6*e^(I*x))/(e^(8*I*x) + 4*e^(6*I*x) + 6*e^(4*I*x) + 4*e^(2*I*x) + 1)

________________________________________________________________________________________

giac [B]  time = 0.53, size = 87, normalized size = 2.18 \[ -\frac {3 i \, \tan \left (\frac {1}{2} \, x\right )^{7} + 24 \, \tan \left (\frac {1}{2} \, x\right )^{6} + 21 i \, \tan \left (\frac {1}{2} \, x\right )^{5} - 24 \, \tan \left (\frac {1}{2} \, x\right )^{4} + 21 i \, \tan \left (\frac {1}{2} \, x\right )^{3} + 8 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 3 i \, \tan \left (\frac {1}{2} \, x\right ) - 8}{12 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{2} - 1\right )}^{4}} + \frac {1}{8} i \, \log \left (\tan \left (\frac {1}{2} \, x\right ) + 1\right ) - \frac {1}{8} i \, \log \left (\tan \left (\frac {1}{2} \, x\right ) - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^5/(I+cot(x)),x, algorithm="giac")

[Out]

-1/12*(3*I*tan(1/2*x)^7 + 24*tan(1/2*x)^6 + 21*I*tan(1/2*x)^5 - 24*tan(1/2*x)^4 + 21*I*tan(1/2*x)^3 + 8*tan(1/
2*x)^2 + 3*I*tan(1/2*x) - 8)/(tan(1/2*x)^2 - 1)^4 + 1/8*I*log(tan(1/2*x) + 1) - 1/8*I*log(tan(1/2*x) - 1)

________________________________________________________________________________________

maple [B]  time = 0.35, size = 170, normalized size = 4.25 \[ \frac {i}{4 \left (\tan \left (\frac {x}{2}\right )+1\right )^{4}}-\frac {i}{2 \left (\tan \left (\frac {x}{2}\right )-1\right )^{3}}-\frac {1}{3 \left (\tan \left (\frac {x}{2}\right )-1\right )^{3}}+\frac {i \ln \left (\tan \left (\frac {x}{2}\right )+1\right )}{8}-\frac {1}{2 \left (\tan \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {i}{2 \left (\tan \left (\frac {x}{2}\right )+1\right )^{3}}-\frac {1}{2 \left (\tan \left (\frac {x}{2}\right )-1\right )}-\frac {i}{8 \left (\tan \left (\frac {x}{2}\right )-1\right )}-\frac {i}{8 \left (\tan \left (\frac {x}{2}\right )+1\right )}-\frac {i}{4 \left (\tan \left (\frac {x}{2}\right )-1\right )^{4}}+\frac {1}{3 \left (\tan \left (\frac {x}{2}\right )+1\right )^{3}}-\frac {3 i}{8 \left (\tan \left (\frac {x}{2}\right )-1\right )^{2}}+\frac {1}{2 \tan \left (\frac {x}{2}\right )+2}+\frac {3 i}{8 \left (\tan \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {1}{2 \left (\tan \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {i \ln \left (\tan \left (\frac {x}{2}\right )-1\right )}{8} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)^5/(I+cot(x)),x)

[Out]

1/4*I/(tan(1/2*x)+1)^4-1/2*I/(tan(1/2*x)-1)^3-1/3/(tan(1/2*x)-1)^3+1/8*I*ln(tan(1/2*x)+1)-1/2/(tan(1/2*x)-1)^2
-1/2*I/(tan(1/2*x)+1)^3-1/2/(tan(1/2*x)-1)-1/8*I/(tan(1/2*x)-1)-1/8*I/(tan(1/2*x)+1)-1/4*I/(tan(1/2*x)-1)^4+1/
3/(tan(1/2*x)+1)^3-3/8*I/(tan(1/2*x)-1)^2+1/2/(tan(1/2*x)+1)+3/8*I/(tan(1/2*x)+1)^2-1/2/(tan(1/2*x)+1)^2-1/8*I
*ln(tan(1/2*x)-1)

________________________________________________________________________________________

maxima [B]  time = 0.35, size = 167, normalized size = 4.18 \[ -\frac {-\frac {3 i \, \sin \relax (x)}{\cos \relax (x) + 1} - \frac {8 \, \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} - \frac {21 i \, \sin \relax (x)^{3}}{{\left (\cos \relax (x) + 1\right )}^{3}} + \frac {24 \, \sin \relax (x)^{4}}{{\left (\cos \relax (x) + 1\right )}^{4}} - \frac {21 i \, \sin \relax (x)^{5}}{{\left (\cos \relax (x) + 1\right )}^{5}} - \frac {24 \, \sin \relax (x)^{6}}{{\left (\cos \relax (x) + 1\right )}^{6}} - \frac {3 i \, \sin \relax (x)^{7}}{{\left (\cos \relax (x) + 1\right )}^{7}} + 8}{12 \, {\left (\frac {4 \, \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} - \frac {6 \, \sin \relax (x)^{4}}{{\left (\cos \relax (x) + 1\right )}^{4}} + \frac {4 \, \sin \relax (x)^{6}}{{\left (\cos \relax (x) + 1\right )}^{6}} - \frac {\sin \relax (x)^{8}}{{\left (\cos \relax (x) + 1\right )}^{8}} - 1\right )}} + \frac {1}{8} i \, \log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1} + 1\right ) - \frac {1}{8} i \, \log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1} - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^5/(I+cot(x)),x, algorithm="maxima")

[Out]

-1/12*(-3*I*sin(x)/(cos(x) + 1) - 8*sin(x)^2/(cos(x) + 1)^2 - 21*I*sin(x)^3/(cos(x) + 1)^3 + 24*sin(x)^4/(cos(
x) + 1)^4 - 21*I*sin(x)^5/(cos(x) + 1)^5 - 24*sin(x)^6/(cos(x) + 1)^6 - 3*I*sin(x)^7/(cos(x) + 1)^7 + 8)/(4*si
n(x)^2/(cos(x) + 1)^2 - 6*sin(x)^4/(cos(x) + 1)^4 + 4*sin(x)^6/(cos(x) + 1)^6 - sin(x)^8/(cos(x) + 1)^8 - 1) +
 1/8*I*log(sin(x)/(cos(x) + 1) + 1) - 1/8*I*log(sin(x)/(cos(x) + 1) - 1)

________________________________________________________________________________________

mupad [B]  time = 0.46, size = 81, normalized size = 2.02 \[ \frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {x}{2}\right )\right )\,1{}\mathrm {i}}{4}-\frac {\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^7\,1{}\mathrm {i}}{4}+2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^6+\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^5\,7{}\mathrm {i}}{4}-2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4+\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^3\,7{}\mathrm {i}}{4}+\frac {2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{3}+\frac {\mathrm {tan}\left (\frac {x}{2}\right )\,1{}\mathrm {i}}{4}-\frac {2}{3}}{{\left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2-1\right )}^4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(x)^5*(cot(x) + 1i)),x)

[Out]

(atanh(tan(x/2))*1i)/4 - ((tan(x/2)*1i)/4 + (2*tan(x/2)^2)/3 + (tan(x/2)^3*7i)/4 - 2*tan(x/2)^4 + (tan(x/2)^5*
7i)/4 + 2*tan(x/2)^6 + (tan(x/2)^7*1i)/4 - 2/3)/(tan(x/2)^2 - 1)^4

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{5}{\relax (x )}}{\cot {\relax (x )} + i}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)**5/(I+cot(x)),x)

[Out]

Integral(sec(x)**5/(cot(x) + I), x)

________________________________________________________________________________________